package com.neteast.androidclient.newscenter.receiver;

import com.neteast.androidclient.newscenter.util.ConfigUtil;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

public class SetReceiver extends BroadcastReceiver {

	@Override
	public void onReceive(Context context, Intent intent) {
		String[] params = intent.getStringArrayExtra(Intent.EXTRA_TEXT);
		if (params!=null&&params.length>0) {
			String ip=params[0];
			int port=Integer.valueOf(params[1]);
			ConfigUtil.setBootStrapIp(context, ip);
			ConfigUtil.setBootStrapPort(context, port);
		}
	}
}
